package gervosou;

import java.io.*;
import java.util.*;

public class CompteSociete 
	implements Serializable {
	
	private int numCompte;
	private float solde;
	private Societe soc;
	
	public CompteSociete(int numc, float s, Societe soc) {
		this.setNumCompte(numc);
		this.setSolde(s);
		this.lierSociete(soc);
	}
	
	private void setNumCompte(int numc) {
		numCompte = numc;
	}
	
	public void setSolde(float s) {
		solde = s;
	}
	
	public int getNumCompte() {
		return numCompte;
	}

	public float getSolde() {
		return solde;
	}	
	
	public void setSociete(Societe s) {
		soc = s;}
	
	public Societe getSociete() {
		return(soc);
	}

	private void lierSociete(Societe cs) {
	this.setSociete(cs);
	cs.rajoutCompteSoc(this);
	}
}